home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 8 / QRZ Ham Radio Callsign Database - Volume 8.iso / mac / files / dsp / dspkgctr.z / dspkgctr / gcc / rtl.h < prev    next >
C/C++ Source or Header  |  1992-06-08  |  24KB  |  657 lines

  1. /* Register Transfer Language (RTL) definitions for GNU C-Compiler
  2.    Copyright (C) 1987 Free Software Foundation, Inc.
  3.  
  4.    $Id: rtl.h,v 1.13 91/11/22 19:44:32 pete Exp $
  5.  
  6. This file is part of GNU CC.
  7.  
  8. GNU CC is free software; you can redistribute it and/or modify
  9. it under the terms of the GNU General Public License as published by
  10. the Free Software Foundation; either version 1, or (at your option)
  11. any later version.
  12.  
  13. GNU CC is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. GNU General Public License for more details.
  17.  
  18. You should have received a copy of the GNU General Public License
  19. along with GNU CC; see the file COPYING.  If not, write to
  20. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  21.  
  22.  
  23. #undef FFS  /* Some systems predefine this symbol; don't let it interfere.  */
  24.  
  25. /* Register Transfer Language EXPRESSIONS CODES */
  26.  
  27. #define RTX_CODE    enum rtx_code
  28. enum rtx_code  {
  29.  
  30. #define DEF_RTL_EXPR(ENUM, NAME, FORMAT)   ENUM ,
  31. #include "rtl.def"        /* rtl expressions are documented here */
  32. #undef DEF_RTL_EXPR
  33.  
  34.   LAST_AND_UNUSED_RTX_CODE};    /* A convienent way to get a value for
  35.                    NUM_RTX_CODE.
  36.                    Assumes default enum value assignement.  */
  37.  
  38. #define NUM_RTX_CODE ((int)LAST_AND_UNUSED_RTX_CODE)
  39.                 /* The cast here, saves many elsewhere.  */
  40.  
  41. extern int rtx_length[];
  42. #define GET_RTX_LENGTH(CODE)        (rtx_length[(int)(CODE)])
  43.  
  44. extern char *rtx_name[];
  45. #define GET_RTX_NAME(CODE)        (rtx_name[(int)(CODE)])
  46.  
  47. extern char *rtx_format[];
  48. #define GET_RTX_FORMAT(CODE)        (rtx_format[(int)(CODE)])
  49.  
  50.  
  51. /* Get the definition of `enum machine_mode' */
  52.  
  53. #ifndef HAVE_MACHINE_MODES
  54.  
  55. #define DEF_MACHMODE(SYM, NAME, TYPE, SIZE, UNIT, WIDER)  SYM,
  56.  
  57. enum machine_mode {
  58. #include "machmode.def"
  59. MAX_MACHINE_MODE };
  60.  
  61. #undef DEF_MACHMODE
  62.  
  63. #define HAVE_MACHINE_MODES
  64.  
  65. #endif /* not HAVE_MACHINE_MODES */
  66.  
  67. #ifndef NUM_MACHINE_MODES
  68. #define NUM_MACHINE_MODES (int) MAX_MACHINE_MODE
  69. #endif
  70.  
  71. /* Get the name of mode MODE as a string.  */
  72.  
  73. extern char *mode_name[];
  74. #define GET_MODE_NAME(MODE)        (mode_name[(int)(MODE)])
  75.  
  76. enum mode_class { MODE_RANDOM, MODE_INT, MODE_FLOAT,
  77.           MODE_COMPLEX_INT, MODE_COMPLEX_FLOAT, MODE_FUNCTION };
  78.  
  79. /* Get the general kind of object that mode MODE represents
  80.    (integer, floating, complex, etc.)  */
  81.  
  82. extern enum mode_class mode_class[];
  83. #define GET_MODE_CLASS(MODE)        (mode_class[(int)(MODE)])
  84.  
  85. /* Get the size in bytes of an object of mode MODE.  */
  86.  
  87. extern int mode_size[];
  88. #if defined( DSP56000 )
  89. #define GET_MODE_SIZE(MODE)        (PSImode==(MODE)?1:(mode_size[(int)(MODE)]/3))
  90. #else
  91. #define GET_MODE_SIZE(MODE)        (mode_size[(int)(MODE)])
  92. #endif
  93.  
  94. /* Get the size in bytes of the basic parts of an object of mode MODE.  */
  95.  
  96. extern int mode_unit_size[];
  97. #if defined( DSP56000 )
  98. #define GET_MODE_UNIT_SIZE(MODE)    (mode_unit_size[(int)(MODE)]/3)
  99. #else
  100. #define GET_MODE_UNIT_SIZE(MODE)    (mode_unit_size[(int)(MODE)])
  101. #endif
  102.  
  103. /* Get the size in bits of an object of mode MODE.  */
  104.  
  105. #if defined( DSP56000 )
  106. #define GET_MODE_BITSIZE(MODE)  (BITS_PER_UNIT * mode_size[(int)(MODE)]/3)
  107. #else
  108. #define GET_MODE_BITSIZE(MODE)  (BITS_PER_UNIT * mode_size[(int)(MODE)])
  109. #endif
  110.  
  111. /* Get a bitmask containing 1 for all bits in a word
  112.    that fit within mode MODE.  */
  113.  
  114. #define GET_MODE_MASK(MODE)  \
  115.    ((GET_MODE_BITSIZE (MODE) >= HOST_BITS_PER_INT)  \
  116.     ? -1 : ((1 << GET_MODE_BITSIZE (MODE)) - 1))
  117.  
  118. /* Get the next wider natural mode (eg, QI -> HI -> SI -> DI -> TI).  */
  119.  
  120. extern enum machine_mode mode_wider_mode[];
  121. #define GET_MODE_WIDER_MODE(MODE)    (mode_wider_mode[(int)(MODE)])
  122.  
  123. /* Common union for an element of an rtx.  */
  124.  
  125. typedef union rtunion_def
  126. {
  127.   int rtint;
  128.   char *rtstr;
  129.   struct rtx_def *rtx;
  130.   struct rtvec_def *rtvec;
  131.   enum machine_mode rttype;
  132. } rtunion;
  133.  
  134. /* RTL expression ("rtx").  */
  135.  
  136. typedef struct rtx_def
  137. {
  138. #ifdef SHORT_ENUM_BUG
  139.   unsigned short code;
  140. #else
  141. #if defined ( _INTELC32_ ) || defined( __WATCOMC__ )
  142.   /* The kind of expression this is.  */
  143.   enum rtx_code code;
  144. #else
  145.   /* The kind of expression this is.  */
  146.   enum rtx_code code : 16;
  147. #endif /* _INTELC32_ || __WATCOMC__ */
  148. #endif /* SHORT_ENUM_BUG */
  149.  
  150. #if defined ( __WATCOMC__ )
  151. /*  it looks as though the fabulous CUM compiler dontdono bit fields */
  152.   /* The kind of value the expression has.  */
  153.   enum machine_mode mode;
  154.   /* 1 in an INSN if it can alter flow of control
  155.      within this function.  Not yet used!  */
  156.   unsigned int jump;
  157.   /* 1 in an INSN if it can call another function.  Not yet used!  */
  158.   unsigned int call;
  159.   /* 1 in a MEM or REG if value of this expression will never change
  160.      during the current function, even though it is not
  161.      manifestly constant.
  162.      1 in a SYMBOL_REF if it addresses something in the per-function
  163.      constants pool.  */
  164.   unsigned int unchanging;
  165.   /* 1 in a MEM expression if contents of memory are volatile.  */
  166.   /* 1 in an INSN, CALL_INSN, JUMP_INSN, CODE_LABEL or BARRIER
  167.      if it is deleted.  */
  168.   /* 1 in a REG expression if corresponds to a variable declared by the user.
  169.      0 for an internally generated temporary.  */
  170.   unsigned int volatil;
  171.   /* 1 in a MEM referring to a field of a structure (not a union!).
  172.      0 if the MEM was a variable or the result of a * operator in C;
  173.      1 if it was the result of a . or -> operator (on a struct) in C.  */
  174.   unsigned int in_struct;
  175.   /* 1 if this rtx is used.  This is used for copying shared structure.
  176.      See `unshare_all_rtl'.
  177.      This bit is used to detect that event.  */
  178.   unsigned int used;
  179.   /* Nonzero if this rtx came from procedure integration.
  180.      In a REG, nonzero means this reg refers to the return value
  181.      of the current function.  */
  182.   unsigned integrated;
  183.   /* The first element of the operands of this rtx.
  184.      The number of operands and their types are controlled
  185.      by the `code' field, according to rtl.def.  */
  186. #if defined( DSP56000 )
  187.   /* 1 in a SUBREG created by emit_reload_insn, which contains no real meaning,
  188.      but is used to alter the access mode. */
  189.   unsigned int reload_subreg;
  190.   /* 1 if the insn is an UNSIGNED compare. On the 56k, signed compares may use
  191.      10 different register combinations, unsigned can use only one. */
  192.   unsigned int unsigned_compare;
  193. #endif  /* DSP56000 */
  194. #if defined( DSP56000 ) || defined( DSP96000 )
  195.   /* this is part of the kludge to fix the reload fiasco. 
  196.      a new field is needed in order to tag addresses of 
  197.      stack spill slots. */
  198.   unsigned reload_generated;
  199.   /* This MEM expression was generated as a reload stack slot. */
  200. #define RTX_RELOAD_GENERATED_P(RTX) ((RTX)->reload_generated)
  201. #endif /* DSP56000 || DSP96000 */
  202. #else  /* ! __WATCOMC__ */
  203. #if defined ( _INTELC32_ )
  204.   /* The kind of value the expression has.  */
  205.   enum machine_mode mode;
  206. #else
  207.   /* The kind of value the expression has.  */
  208.   enum machine_mode mode : 8;
  209. #endif  /* _INTELC32_ */
  210.   /* 1 in an INSN if it can alter flow of control
  211.      within this function.  Not yet used!  */
  212.   unsigned int jump : 1;
  213.   /* 1 in an INSN if it can call another function.  Not yet used!  */
  214.   unsigned int call : 1;
  215.   /* 1 in a MEM or REG if value of this expression will never change
  216.      during the current function, even though it is not
  217.      manifestly constant.
  218.      1 in a SYMBOL_REF if it addresses something in the per-function
  219.      constants pool.  */
  220.   unsigned int unchanging : 1;
  221.   /* 1 in a MEM expression if contents of memory are volatile.  */
  222.   /* 1 in an INSN, CALL_INSN, JUMP_INSN, CODE_LABEL or BARRIER
  223.      if it is deleted.  */
  224.   /* 1 in a REG expression if corresponds to a variable declared by the user.
  225.      0 for an internally generated temporary.  */
  226.   unsigned int volatil : 1;
  227.   /* 1 in a MEM referring to a field of a structure (not a union!).
  228.      0 if the MEM was a variable or the result of a * operator in C;
  229.      1 if it was the result of a . or -> operator (on a struct) in C.  */
  230.   unsigned int in_struct : 1;
  231.   /* 1 if this rtx is used.  This is used for copying shared structure.
  232.      See `unshare_all_rtl'.
  233.      This bit is used to detect that event.  */
  234.   unsigned int used : 1;
  235.   /* Nonzero if this rtx came from procedure integration.
  236.      In a REG, nonzero means this reg refers to the return value
  237.      of the current function.  */
  238.   unsigned integrated : 1;
  239.   /* The first element of the operands of this rtx.
  240.      The number of operands and their types are controlled
  241.      by the `code' field, according to rtl.def.  */
  242. #if defined( DSP56000 )
  243.   /* 1 in a SUBREG created by emit_reload_insn, which contains no real meaning,
  244.      but is used to alter the access mode. */
  245.   unsigned int reload_subreg : 1;
  246.   /* 1 if the insn is an UNSIGNED compare. On the 56k, signed compares may use
  247.      10 different register combinations, unsigned can use only one. */
  248.   unsigned int unsigned_compare : 1;
  249. #endif  /* DSP56000 */
  250. #if defined( DSP56000 ) || defined( DSP96000 )
  251.   /* this is part of the kludge to fix the reload fiasco. 
  252.      a new field is needed in order to tag addresses of 
  253.      stack spill slots. */
  254.   unsigned reload_generated : 1;
  255.   /* This MEM expression was generated as a reload stack slot. */
  256. #define RTX_RELOAD_GENERATED_P(RTX) ((RTX)->reload_generated)
  257. #endif  /* DSP56000 || DSP96000 */
  258. #endif  /* __WATCOMC__ */
  259.   rtunion fld[1];
  260. } *rtx;
  261.  
  262. #define NULL_RTX (rtx) 0
  263.  
  264. /* Define macros to access the `code' field of the rtx.  */
  265.  
  266. #ifdef SHORT_ENUM_BUG
  267. #define GET_CODE(RTX)        ((enum rtx_code) ((RTX)->code))
  268. #define PUT_CODE(RTX, CODE)    ((RTX)->code = ((short) (CODE)))
  269. #else
  270. #define GET_CODE(RTX)        ((RTX)->code)
  271. #define PUT_CODE(RTX, CODE)    ((RTX)->code = (CODE))
  272. #endif
  273.  
  274. #define GET_MODE(RTX)        ((RTX)->mode)
  275. #define PUT_MODE(RTX, MODE)    ((RTX)->mode = (MODE))
  276.  
  277. #define RTX_INTEGRATED_P(RTX) ((RTX)->integrated)
  278. #define RTX_UNCHANGING_P(RTX) ((RTX)->unchanging)
  279.  
  280. /* RTL vector.  These appear inside RTX's when there is a need
  281.    for a variable number of things.  The principle use is inside
  282.    PARALLEL expressions.  */
  283.  
  284. typedef struct rtvec_def{
  285.   unsigned num_elem;        /* number of elements */
  286.   rtunion elem[1];
  287. } *rtvec;
  288.  
  289. #define NULL_RTVEC (rtvec) 0
  290.  
  291. #define GET_NUM_ELEM(RTVEC)        ((RTVEC)->num_elem)
  292. #define PUT_NUM_ELEM(RTVEC, NUM)    ((RTVEC)->num_elem = (unsigned) NUM)
  293.  
  294. /* 1 if X is a REG.  */
  295.  
  296. #define REG_P(X) (GET_CODE (X) == REG)
  297.  
  298. /* 1 if X is a constant value that is an integer.  */
  299.  
  300. #define CONSTANT_P(X)   \
  301.   (GET_CODE (X) == LABEL_REF || GET_CODE (X) == SYMBOL_REF        \
  302.    || GET_CODE (X) == CONST_INT                        \
  303.    || GET_CODE (X) == CONST)
  304.  
  305. /* General accessor macros for accessing the fields of an rtx.  */
  306.  
  307. #define XEXP(RTX, N)    ((RTX)->fld[N].rtx)
  308. #define XINT(RTX, N)    ((RTX)->fld[N].rtint)
  309. #define XSTR(RTX, N)    ((RTX)->fld[N].rtstr)
  310. #define XVEC(RTX, N)    ((RTX)->fld[N].rtvec)
  311. #define XVECLEN(RTX, N)    ((RTX)->fld[N].rtvec->num_elem)
  312. #define XVECEXP(RTX,N,M)((RTX)->fld[N].rtvec->elem[M].rtx)
  313.  
  314. /* ACCESS MACROS for particular fields of insns.  */
  315.  
  316. /* Holds a unique number for each insn.
  317.    These are not necessarily sequentially increasing.  */
  318. #define INSN_UID(INSN)    ((INSN)->fld[0].rtint)
  319.  
  320. /* Chain insns together in sequence.  */
  321. #define PREV_INSN(INSN)    ((INSN)->fld[1].rtx)
  322. #define NEXT_INSN(INSN)    ((INSN)->fld[2].rtx)
  323.  
  324. /* The body of an insn.  */
  325. #define PATTERN(INSN)    ((INSN)->fld[3].rtx)
  326.  
  327. /* Code number of instruction, from when it was recognized.
  328.    -1 means this instruction has not been recognized yet.  */
  329. #define INSN_CODE(INSN) ((INSN)->fld[4].rtint)
  330.  
  331. /* Set up in flow.c; empty before then.
  332.    Holds a chain of INSN_LIST rtx's whose first operands point at
  333.    previous insns with direct data-flow connections to this one.
  334.    That means that those insns set variables whose next use is in this insn.
  335.    They are always in the same basic block as this insn.  */
  336. #define LOG_LINKS(INSN)        ((INSN)->fld[5].rtx)
  337.  
  338. /* 1 if insn has been deleted.  */
  339. #define INSN_DELETED_P(INSN) ((INSN)->volatil)
  340.  
  341. /* Holds a list of notes on what this insn does to various REGs.
  342.    It is a chain of EXPR_LIST rtx's, where the second operand
  343.    is the chain pointer and the first operand is the REG being described.
  344.    The mode field of the EXPR_LIST contains not a real machine mode
  345.    but a value that says what this note says about the REG:
  346.      REG_DEAD means that the REG dies in this insn.
  347.      REG_INC means that the REG is autoincremented or autodecremented.
  348.    Note that one insn can have both REG_DEAD and REG_INC for the same register
  349.    if the register is preincremented or predecremented in the insn
  350.    and not needed afterward.  This can probably happen.
  351.      REG_EQUIV describes the insn as a whole; it says that the
  352.    insn sets a register to a constant value or to be equivalent to
  353.    a memory address.  If the
  354.    register is spilled to the stack then the constant value
  355.    should be substituted for it.  The contents of the REG_EQUIV
  356.    is the constant value or memory address, which may be different
  357.    from the source of the SET although it has the same value. 
  358.      REG_EQUAL is like REG_EQUIV except that the destination
  359.    is only momentarily equal to the specified rtx.  Therefore, it
  360.    cannot be used for substitution; but it can be used for cse.
  361.      REG_RETVAL means that this insn copies the return-value of
  362.    a library call out of the hard reg for return values.  This note
  363.    is actually an INSN_LIST and it points to the first insn involved
  364.    in setting up arguments for the call.  flow.c uses this to delete
  365.    the entire library call when its result is dead.
  366.      REG_LIBCALL is the inverse of REG_RETVAL: it goes on the first insn
  367.    of the library call and points at the one that has the REG_RETVAL.
  368.      REG_WAS_0 says that the register set in this insn held 0 before the insn.
  369.    The contents of the note is the insn that stored the 0.
  370.    If that insn is deleted or patched to a NOTE, the REG_WAS_0 is inoperative.
  371.    The REG_WAS_0 note is actually an INSN_LIST, not an EXPR_LIST.
  372.      REG_NONNEG means that the register is always nonnegative during
  373.    the containing loop.  This is used in branches so that decrement and
  374.    branch instructions terminating on zero can be matched.
  375.      REG_UNSET identifies a pseudo-reg used in this insn and never set.  */
  376.  
  377. #define REG_NOTES(INSN)    ((INSN)->fld[6].rtx)
  378.  
  379. /* Don't forget to change reg_note_name in rtl.c.  */
  380. enum reg_note { REG_DEAD = 1, REG_INC = 2, REG_EQUIV = 3, REG_WAS_0 = 4,
  381.         REG_EQUAL = 5, REG_RETVAL = 6, REG_LIBCALL = 7,
  382.         REG_NONNEG = 8, REG_UNSET = 9 };
  383.  
  384. /* Extract the reg-note kind from an EXPR_LIST.  */
  385. #define REG_NOTE_KIND(LINK) ((enum reg_note) GET_MODE (LINK))
  386.  
  387. /* Names for REG_NOTE's in EXPR_LIST insn's.  */
  388.  
  389. extern char *reg_note_name[];
  390. #define GET_REG_NOTE_NAME(MODE) (reg_note_name[(int)(MODE)])
  391.  
  392. /* The label-number of a code-label.  The assembler label
  393.    is made from `L' and the label-number printed in decimal.
  394.    Label numbers are unique in a compilation.  */
  395. #define CODE_LABEL_NUMBER(INSN)    ((INSN)->fld[3].rtint)
  396.  
  397. #define LINE_NUMBER NOTE
  398.  
  399. /* In a NOTE that is a line number, this is a string for the file name
  400.    that the line is in.  */
  401.  
  402. #define NOTE_SOURCE_FILE(INSN)  ((INSN)->fld[3].rtstr)
  403.  
  404. /* In a NOTE that is a line number, this is the line number.
  405.    Other kinds of NOTEs are identified by negative numbers here.  */
  406. #define NOTE_LINE_NUMBER(INSN) ((INSN)->fld[4].rtint)
  407.  
  408. /* Codes that appear in the NOTE_LINE_NUMBER field
  409.    for kinds of notes that are not line numbers.  */
  410.  
  411. /* This note indicates the end of the real body of the function,
  412.    after moving the parms into their homes, etc.  */
  413. #define NOTE_INSN_FUNCTION_BEG 0
  414.  
  415. /* This note is used to get rid of an insn
  416.    when it isn't safe to patch the insn out of the chain.  */
  417. #define NOTE_INSN_DELETED -1
  418. #define NOTE_INSN_BLOCK_BEG -2
  419. #define NOTE_INSN_BLOCK_END -3
  420. #define NOTE_INSN_LOOP_BEG -4
  421. #define NOTE_INSN_LOOP_END -5
  422. /* This kind of note is generated at the end of the function body,
  423.    just before the return insn or return label.
  424.    In an optimizing compilation it is deleted by the first jump optimization,
  425.    after enabling that optimizer to determine whether control can fall
  426.    off the end of the function body without a return statement.  */
  427. #define NOTE_INSN_FUNCTION_END -6
  428. /* This kind of note is generated just after each call to `setjmp', et al.  */
  429. #define NOTE_INSN_SETJMP -7
  430. /* Generated at the place in a loop that `continue' jumps to.  */
  431. #define NOTE_INSN_LOOP_CONT -8
  432. /* Don't forget to change note_insn_name in rtl.c.  */
  433.  
  434. #define NOTE_DECL_NAME(INSN) ((INSN)->fld[3].rtstr)
  435. #define NOTE_DECL_CODE(INSN) ((INSN)->fld[4].rtint)
  436. #define NOTE_DECL_RTL(INSN) ((INSN)->fld[5].rtx)
  437. #define NOTE_DECL_IDENTIFIER(INSN) ((INSN)->fld[6].rtint)
  438. #define NOTE_DECL_TYPE(INSN) ((INSN)->fld[7].rtint)
  439.  
  440. /* Names for NOTE insn's other than line numbers.  */
  441.  
  442. extern char *note_insn_name[];
  443. #define GET_NOTE_INSN_NAME(NOTE_CODE) (note_insn_name[-(NOTE_CODE)])
  444.  
  445. /* In jump.c, each label contains a count of the number
  446.    of LABEL_REFs that point at it, so unused labels can be deleted.  */
  447. #define LABEL_NUSES(LABEL) ((LABEL)->fld[4].rtint)
  448.  
  449. /* In jump.c, each JUMP_INSN can point to a label that it can jump to,
  450.    so that if the JUMP_INSN is deleted, the label's LABEL_NUSES can
  451.    be decremented and possibly the label can be deleted.  */
  452. #define JUMP_LABEL(INSN)   ((INSN)->fld[7].rtx)
  453.  
  454. /* Once basic blocks are found in flow.c,
  455.    each CODE_LABEL starts a chain that goes through
  456.    all the LABEL_REFs that jump to that label.
  457.    The chain eventually winds up at the CODE_LABEL; it is circular.  */
  458. #define LABEL_REFS(LABEL) ((LABEL)->fld[4].rtx)
  459.  
  460. /* This is the field in the LABEL_REF through which the circular chain
  461.    of references to a particular label is linked.
  462.    This chain is set up in flow.c.  */
  463.  
  464. #define LABEL_NEXTREF(REF) ((REF)->fld[1].rtx)
  465.  
  466. /* Once basic blocks are found in flow.c,
  467.    Each LABEL_REF points to its containing instruction with this field.  */
  468.  
  469. #define CONTAINING_INSN(RTX) ((RTX)->fld[2].rtx)
  470.  
  471. /* For a REG rtx, REGNO extracts the register number.  */
  472.  
  473. #define REGNO(RTX) ((RTX)->fld[0].rtint)
  474.  
  475. #if defined( DSP56000 )
  476. /* 1 if RTX is a meaning-free SUBREG created by emit_reload_insns ( ) */
  477. #define RELOAD_SUBREG_P(RTX) ((RTX)->reload_subreg)
  478. /* 1 if INSN is an unsigned compare */
  479. #define UNSIGNED_COMPARE_P(INSN) ((INSN)->unsigned_compare)
  480. #endif
  481.  
  482. /* For a REG rtx, REG_FUNCTION_VALUE_P is nonzero if the reg
  483.    is the current function's return value.  */
  484.  
  485. #define REG_FUNCTION_VALUE_P(RTX) ((RTX)->integrated)
  486.  
  487. /* 1 in a REG rtx if it corresponds to a variable declared by the user.  */
  488. #define REG_USERVAR_P(RTX) ((RTX)->volatil)
  489.  
  490. /* For a CONST_INT rtx, INTVAL extracts the integer.  */
  491.  
  492. #define INTVAL(RTX) ((RTX)->fld[0].rtint)
  493.  
  494. /* For a SUBREG rtx, SUBREG_REG extracts the value we want a subreg of.
  495.    SUBREG_WORD extracts the word-number.  */
  496.  
  497. #define SUBREG_REG(RTX) ((RTX)->fld[0].rtx)
  498. #define SUBREG_WORD(RTX) ((RTX)->fld[1].rtint)
  499.  
  500. /* Access various components of an ASM_OPERANDS rtx.  */
  501.  
  502. #define ASM_OPERANDS_TEMPLATE(RTX) XSTR ((RTX), 0)
  503. #define ASM_OPERANDS_OUTPUT_CONSTRAINT(RTX) XSTR ((RTX), 1)
  504. #define ASM_OPERANDS_OUTPUT_IDX(RTX) XINT ((RTX), 2)
  505. #define ASM_OPERANDS_INPUT_VEC(RTX) XVEC ((RTX), 3)
  506. #define ASM_OPERANDS_INPUT_CONSTRAINT_VEC(RTX) XVEC ((RTX), 4)
  507. #define ASM_OPERANDS_INPUT(RTX, N) XVECEXP ((RTX), 3, (N))
  508. #define ASM_OPERANDS_INPUT_CONSTRAINT(RTX, N) XSTR (XVECEXP ((RTX), 4, (N)), 0)
  509. #define ASM_OPERANDS_INPUT_MODE(RTX, N) GET_MODE (XVECEXP ((RTX), 4, (N)))
  510. #define ASM_OPERANDS_SOURCE_FILE(RTX) XSTR ((RTX), 5)
  511. #define ASM_OPERANDS_SOURCE_LINE(RTX) XINT ((RTX), 6)
  512.  
  513. /* For a MEM rtx, 1 if it's a volatile reference.
  514.    Also in an ASM_OPERANDS rtx.  */
  515. #define MEM_VOLATILE_P(RTX) ((RTX)->volatil)
  516.  
  517. /* For a MEM rtx, 1 if it refers to a structure or union component.  */
  518. #define MEM_IN_STRUCT_P(RTX) ((RTX)->in_struct)
  519.  
  520. /* For a SET rtx, SET_DEST is the place that is set
  521.    and SET_SRC is the value it is set to.  */
  522. #define SET_DEST(RTX) ((RTX)->fld[0].rtx)
  523. #define SET_SRC(RTX) ((RTX)->fld[1].rtx)
  524.  
  525. /* 1 in a SYMBOL_REF if it addresses this function's constants pool.  */
  526. #define CONSTANT_POOL_ADDRESS_P(RTX) ((RTX)->unchanging)
  527.  
  528. /* For an INLINE_HEADER rtx, FIRST_FUNCTION_INSN is the first insn
  529.    of the function that is not involved in copying parameters to
  530.    pseudo-registers.  FIRST_PARM_INSN is the very first insn of
  531.    the function, including the parameter copying.
  532.    We keep this around in case we must splice
  533.    this function into the assembly code at the end of the file.
  534.    FIRST_LABELNO is the first label number used by the function (inclusive).
  535.    LAST_LABELNO is the last label used by the function (exclusive).
  536.    MAX_REGNUM is the largest pseudo-register used by that function.
  537.  
  538.    We want this to lay down like an INSN.  The PREV_INSN field
  539.    is always NULL.  The NEXT_INSN field always points to the
  540.    first function insn of the function being squirreled away.  */
  541.  
  542. #define FIRST_FUNCTION_INSN(RTX) ((RTX)->fld[2].rtx)
  543. #define FIRST_PARM_INSN(RTX) ((RTX)->fld[3].rtx)
  544. #define FIRST_LABELNO(RTX) ((RTX)->fld[4].rtint)
  545. #define LAST_LABELNO(RTX) ((RTX)->fld[5].rtint)
  546. #define MAX_PARMREG(RTX) ((RTX)->fld[6].rtint)
  547. #define MAX_REGNUM(RTX) ((RTX)->fld[7].rtint)
  548. #define FUNCTION_ARGS_SIZE(RTX) ((RTX)->fld[8].rtint)
  549.  
  550. /* Generally useful functions.  */
  551.  
  552. extern rtx rtx_alloc ();
  553. extern rtvec rtvec_alloc ();
  554. extern rtx find_reg_note ();
  555. #if defined( STDARGS_ARE_COOL )
  556. extern rtx gen_rtx ( enum rtx_code, ... );
  557. #else
  558. extern rtx gen_rtx ();
  559. #endif
  560. #if defined( DSP96000 )
  561. /* ugliness due to deficient MetaWare C Compiler. */
  562. extern rtx local_fuction_incoming_arg ( );
  563. #endif
  564. extern rtx copy_rtx ();
  565. #if defined( STDARGS_ARE_COOL )
  566. extern rtvec gen_rtvec ( int, ... );
  567. #else
  568. extern rtvec gen_rtvec ();
  569. #endif
  570. extern rtvec gen_rtvec_v ();
  571. extern rtx gen_reg_rtx ();
  572. extern rtx gen_label_rtx ();
  573. extern rtx gen_inline_header_rtx ();
  574. extern rtx gen_lowpart ();
  575. extern rtx gen_highpart ();
  576. extern int subreg_lowpart_p ();
  577. extern rtx make_safe_from ();
  578. extern rtx memory_address ();
  579. extern rtx get_insns ();
  580. extern rtx get_last_insn ();
  581. extern rtx start_sequence ();
  582. extern rtx gen_sequence ();
  583. extern rtx expand_expr ();
  584. extern rtx output_constant_def ();
  585. extern rtx immed_real_const ();
  586. extern rtx immed_real_const_1 ();
  587. extern rtx immed_double_const ();
  588. extern rtx force_const_double_mem ();
  589. extern rtx force_const_mem ();
  590. extern rtx get_parm_real_loc ();
  591. extern rtx assign_stack_local ();
  592. extern rtx protect_from_queue ();
  593. extern void emit_queue ();
  594. extern rtx emit_move_insn ();
  595. extern rtx emit_insn ();
  596. extern rtx emit_jump_insn ();
  597. extern rtx emit_call_insn ();
  598. extern rtx emit_call_insn_before ();
  599. extern rtx emit_insn_before ();
  600. extern rtx emit_insn_after ();
  601. extern rtx emit_label ();
  602. extern rtx emit_barrier ();
  603. extern rtx emit_barrier_after ();
  604. extern rtx emit_note ();
  605. extern rtx emit_line_note ();
  606. extern rtx emit_line_note_force ();
  607. extern rtx prev_real_insn ();
  608. extern rtx next_real_insn ();
  609. extern rtx next_nondeleted_insn ();
  610. extern rtx plus_constant ();
  611. extern rtx find_equiv_reg ();
  612. extern rtx delete_insn ();
  613. extern rtx adj_offsettable_operand ();
  614.  
  615. /* Maximum number of parallel sets and clobbers in any insn in this fn.
  616.    Always at least 3, since the combiner could put that many togetherm
  617.    and we want this to remain correct for all the remaining passes.  */
  618.  
  619. extern int max_parallel;
  620.  
  621. extern int asm_noperands ();
  622. extern char *decode_asm_operands ();
  623.  
  624. #ifdef BITS_PER_WORD
  625. /* Conditional is to detect when config.h has been included.  */
  626. extern enum reg_class reg_preferred_class ();
  627. #endif
  628.  
  629. extern rtx get_first_nonparm_insn ();
  630.  
  631. /* Standard pieces of rtx, to be substituted directly into things.  */
  632. extern rtx pc_rtx;
  633. extern rtx cc0_rtx;
  634. extern rtx const0_rtx;
  635. extern rtx const1_rtx;
  636. extern rtx fconst0_rtx;
  637. extern rtx dconst0_rtx;
  638.  
  639. /* Returns a constant 0 rtx in mode MODE.  */
  640.  
  641. #define CONST0_RTX(MODE) \
  642.  ((MODE == SFmode) ? fconst0_rtx            \
  643.   : ((MODE == DFmode) ? dconst0_rtx            \
  644.      : ((GET_MODE_CLASS (MODE) == MODE_INT) ? const0_rtx    \
  645.         : (abort (), NULL_RTX))))
  646.  
  647. /* All references to certain hard regs, except those created
  648.    by allocating pseudo regs into them (when that's possible),
  649.    go through these unique rtx objects.  */
  650. extern rtx stack_pointer_rtx;
  651. extern rtx frame_pointer_rtx;
  652. extern rtx arg_pointer_rtx;
  653. extern rtx struct_value_rtx;
  654. extern rtx struct_value_incoming_rtx;
  655. extern rtx static_chain_rtx;
  656. extern rtx static_chain_incoming_rtx;
  657.